public class PrimeNumbers {

	public static void selection(String numberString) {
		int number = Integer.parseInt(numberString);
		for (int firstNumber = 2; firstNumber <= number; firstNumber++) {
			int divisor = 2;

			while ((firstNumber % divisor) != 0) {
				divisor++;
			}

			if (divisor == firstNumber) {
				System.out.println(firstNumber);

			}

		}

	}

	public static void main(String[] args) {
		
		selection(args[0]);

	}

}
